# 分段函数

x = eval(input())
y = 0

if x < 1:
    y = float(x)
elif x >= 1 and x < 10:
    y = 2 * x - 1
else:
    y = 3 * x - 1

print("{:.2f}".format(y))